 //*******************************************************
 // Dog.java        Author:20172323wyh
 //*******************************************************
 public class Dog
 {
    private String name;
    private int ages;
    private int age;

    //-----------------------------------------------------
    // Sets up the information of dog by defining its name
    // and ages.
    //-----------------------------------------------------
    public Dog(String mingzi, int nianling)
    {
       name = mingzi;
       ages = nianling+0;
    }

    public String getMingzi()
    {
       return name;
    }
 
    public int getNianling()
    {
       return ages;
    }
   
    //-----------------------------------------------------
    // Transfer the dog's ages into human's ages.
    //-----------------------------------------------------
    public int age()
    {
       age = (ages * 7);
       return age;
    }

    public String toString()
    {
       return "Name: " + name + "\n" + "Ages: " + ages + "\n" + "Transfer into human's ages: " + age;
    }
  }
